extends "../aijier-1/aijier-1.gd"


func _extInit():
	._extInit()
	if isInManual():
		addSkill(sk1t1[1], sk1t1[0])
		addSkill(sk1t2[1], sk1t2[0])
	elif sk1 != 0:
		doChoiceSkill1()
	lv = 2             #等级的设置

var sk1t1 = ["吞噬之漩·1", "每秒吞噬周围2格敌人元气，吸取其3%的血量"]
var sk1t2 = ["吞噬之漩·2", "每秒吞噬周围2格敌人元气，吸取其3点三维(同一个角色最高100点)"]

func doChoiceSkill1():
	var sk = get("sk1t%d"%sk1)
	addSkill(sk[1], sk[0])

func _upS():
	._upS()
	for i in getCellChas(cell, 2, 1):
		if sk1 == 1:
			healCha(self, i.att.maxHp * 0.03)
			holyDmg(i, i.att.maxHp * 0.03, "吞噬之漩")
		elif sk1 == 2:
			var bf = hasBuff("b_aijier")
			if bf == null:
				bf = addBuff(b_aijier.new())

			var bf2 = i.hasBuff("b_aijier")
			if bf2 == null:
				bf2 = castBuff(i, b_aijier.new())
			
			if bf2.att.atk > -100:
				bf.att.atk += 3
				bf.att.mgiAtk += 3
				bf.att.def += 3
				bf2.att.atk -= 3
				bf2.att.mgiAtk -= 3
				bf2.att.def -= 3

class b_aijier:
	extends "../../../../azurlane_ctrl/AzurBuff.gd"
	func _init():
		attInit()
		id = "b_aijier"	
		dispel = 2


	
